package com.lagou.service.impl;

import com.lagou.service.HelloService;
import org.apache.dubbo.config.annotation.Service;

import java.util.Random;

@Service(filter = "dubboTraceFilter")
public class HelloServiceImpl implements HelloService {
    Random random = new Random(1);



    @Override
    public String sayHello(String name, int timeToWait) {
        int sleepTime = random.nextInt(100);
        try {
            Thread.sleep(sleepTime);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "hello3:"+name;
    }
}
